a = float(input())
b = float(input())
f = str(input())
if f == '+':
  print (a + b)
elif f == '-':
  print (a - b)
elif f == '*':
  print (a*b)
elif f == '/' and b != 0:
  print (a/b)
elif f == 'mod' and b != 0:
  print (a%b)
elif f == 'pow':
  print (a**b)
elif f == 'div' and b != 0:
  print (a//b)
else:
  print ('Деление на 0!')